﻿<%@ Control Language="C#" AutoEventWireup="true" Codebehind="CateBonusManager.ascx.cs"
    Inherits="NCS.Module.Multimedia.Admin.Bonus.CateBonusManager" %>
<%@ Register Src="../UserControls/Editor.ascx" TagName="Editor" TagPrefix="uc1" %>
<%@ Register Assembly="NCS.Library" Namespace="NCS.Library.Controls" TagPrefix="cc1" %>
<%@ Register Assembly="NCS.FilePickerControl" Namespace="NCS.FilePicker" TagPrefix="cc2" %>
<%@ Register Assembly="System.Web.Extensions" Namespace="System.Web.UI" TagPrefix="asp" %>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
        <td>
            <table border="0" cellpadding="0" cellspacing="0" id="tableGrid" runat="server">
                <tr>
                    <td>
                        &nbsp;</td>
                </tr>
                <tr>
                    <td style="height: 10px;">
                    </td>
                </tr>
                <tr>
                    <td style="width: 750px;">
                        <cc1:GridView ID="dtgCateBonusList" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                            BorderColor="Gainsboro" BorderStyle="Solid" BorderWidth="1px" CellPadding="2"
                            CssClass="Grid" PageSize="15" Width="100%" OnRowCommand="dtgCateBonusList_RowCommand"
                            OnRowDataBound="dtgCateBonusList_RowDataBound" OnRowDeleting="dtgCateBonusList_RowDeleting"
                            OnSelectedIndexChanged="dtgCateBonusList_SelectedIndexChanged">
                            <AlternatingRowStyle CssClass="Grid_Raw2" Height="40" />
                            <RowStyle CssClass="Grid_Raw1" Height="40 " />
                            <HeaderStyle Font-Bold="True" CssClass="Grid_Top"></HeaderStyle>
                            <Columns>
                                <asp:BoundField Visible="true" DataField="CateBonusID" HeaderText="ID">
                                    <headerstyle width="0%"></headerstyle>
                                </asp:BoundField>
                                <asp:TemplateField HeaderText="T&#234;n Album Bonus">
                                    <headerstyle horizontalalign="Center"></headerstyle>
                                    <itemtemplate>
									<asp:HyperLink ID="lnkHeadline" runat="server"></asp:HyperLink>
								</itemtemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <headerstyle horizontalalign="Center" width="120px"></headerstyle>
                                    <itemstyle horizontalalign="Center"></itemstyle>
                                    <headertemplate>
									<asp:Button ID="cmdupdatestatus" CausesValidation="false" runat="server" Width="60" CommandName="updatestatus"
										CssClass="Button" Text="Trạng thái"></asp:Button>
								</headertemplate>
                                    <itemtemplate>
									<asp:DropDownList ID="dropStatus" runat="server" Width="80">
									    <asp:ListItem Text="Ẩn" Value="0"></asp:ListItem>
									    <asp:ListItem Text="Hiển thị" Value="1"></asp:ListItem>
									</asp:DropDownList>
								</itemtemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <headerstyle horizontalalign="Center" width="70px"></headerstyle>
                                    <itemstyle horizontalalign="Center"></itemstyle>
                                    <headertemplate>
									<asp:Button ID="cmdUpdateIndex" CausesValidation="false" runat="server" Width="60" CommandName="updatepriority"
										CssClass="Button" Text="Thứ tự"></asp:Button>
								</headertemplate>
                                    <itemtemplate>
									<asp:DropDownList ID="dropIndex" runat="server" Width="60">
									</asp:DropDownList>
								</itemtemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <headerstyle horizontalalign="Center" width="120px"></headerstyle>
                                    <itemstyle horizontalalign="Center"></itemstyle>
                                    <headertemplate>
									<asp:Button ID="cmdupdaterank" CausesValidation="false" runat="server" Width="60" CommandName="updaterank"
										CssClass="Button" Text="Loại Album bonus"></asp:Button>
								</headertemplate>
                                    <itemtemplate>
									<asp:DropDownList ID="dropRank" runat="server" Width="80">
									    <asp:ListItem Text="Bình thường" Value="1"></asp:ListItem>
									    <asp:ListItem Text="Nổi bật" Value="2"></asp:ListItem>
									</asp:DropDownList>
								</itemtemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Thao t&#225;c">
                                    <headerstyle horizontalalign="Center" width="150px"></headerstyle>
                                    <itemstyle horizontalalign="Center"></itemstyle>
                                    <itemtemplate>									
									<asp:Button ID="cmdEdit" CausesValidation="false" runat="server" CssClass="Button" CommandName="edit"
										Text="Sửa" CommandArgument='<%# Eval("CateBonusID") %>'></asp:Button>
									<asp:Button ID="cmdDel" CausesValidation="false" runat="server" CssClass="Button" CommandName="delete"
										Text="Xóa" CommandArgument='<%# Eval("CateBonusID") %>'></asp:Button>									
									<asp:hyperlink runat=server id="hplComment" CssClass="lightwindow page-options" params="lightwindow_type=external,lightwindow_width=800,lightwindow_height=350">Lời bình</asp:hyperlink>
									
								</itemtemplate>
                                </asp:TemplateField>
                            </Columns>
                        </cc1:GridView>
                    </td>
                </tr>
            </table>
            <br />
        </td>
    </tr>
    <tr>
        <td>
            <div style="text-align: right; padding-right: 20px;">
                <asp:Button ID="btnthemmoi" runat="server" Text="Thêm Album Bonus" CssClass="Button"
                    OnClick="btnthemmoi_Click" />
            </div>
            <table border="0" cellpadding="5" cellspacing="3" id="tb_add" runat="server" visible="false">
                <tr>
                    <td colspan="2" align="center">
                        <asp:Label ID="lbupdate" runat="server"></asp:Label></td>
                </tr>
                <tr>
                    <td style="width: 84px">
                        Tên Album Bonus &nbsp;&nbsp;
                    </td>
                    <td>
                        <asp:TextBox ID="txtCateBonusName" Width="248px" runat="server"></asp:TextBox>&nbsp;&nbsp;&nbsp;&nbsp;
                        Ảnh minh họa&nbsp;<cc2:FilePicker ID="txtAvatar" runat="server" Width="248px" fpPopupURL="/FilePicker/TUFilePicker.aspx"></cc2:FilePicker>
                        <asp:RequiredFieldValidator ID="chknone" ControlToValidate="txtAvatar" runat="server">Chưa có ảnh</asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td style="width: 84px">
                        Album Bonus cha &nbsp;&nbsp;</td>
                    <td>
                        <asp:DropDownList ID="dropCateBonus" DataTextField="CateBonusName" DataValueField="CateBonusID"
                            Width="352px" runat="server">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td style="width: 84px; height: 410px">
                        Nội dung chi tiết</td>
                    <td style="height: 410px">
                        <uc1:Editor ID="Editor1" runat="server"></uc1:Editor>
                    </td>
                </tr>
                <tr>
                    <td style="height: 5px;" colspan="2">
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <asp:CheckBox ID="chkcomment" runat="server" Text="Cho đóng góp ý kiến" />
                    </td>
                </tr>
                <tr>
                    <td style="height: 5px;" colspan="2">
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                    <td>
                        <asp:CheckBox ID="chkalbum" Checked="true" runat="server" Text="Hiển thị" />
                    </td>
                </tr>
                <tr>
                    <td style="height: 5px;" colspan="2">
                    </td>
                </tr>
                <tr>
                    <td style="width: 84px">
                        Loại album&nbsp;bonus</td>
                    <td>
                        <asp:RadioButtonList ID="rdtype" RepeatDirection="horizontal" runat="server">
                            <asp:ListItem Text="Bình thường" Value="1" Selected="true"></asp:ListItem>
                            <asp:ListItem Text="Nổi bật" Value="2"></asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td style="height: 5px;" colspan="2">
                    </td>
                </tr>
                <tr>
                    <td style="width: 84px">
                    </td>
                    <td>
                        <asp:Button ID="btnAdd" runat="server" CssClass="Button" Text="Thêm mới" OnClick="btnAdd_Click" />
                        <asp:Button ID="btnUpdate" runat="server" CssClass="Button" Text="Cập nhật" OnClick="btnUpdate_Click" />
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
